package com.runen.wnhz.runen.ui.adapter.puadapter;

import android.content.Context;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.runen.wnhz.runen.R;
import com.runen.wnhz.runen.bean.MyOrderBean;
import com.runen.wnhz.runen.common.utils.DisplayUtil;
import com.runen.wnhz.runen.common.utils.GlideUtils;
import com.runen.wnhz.runen.data.entity.MyOrderListBean;

import java.util.List;

/**
 * 描述： 我的订单资料
 * 作者： 天天童话丶
 * 时间： 2018/6/1.
 */

public class MyOrderDataAdapter extends BaseQuickAdapter<MyOrderBean.DataBean.ListBean.OtherListBean, BaseViewHolder> {
    private Context mContext;

    public MyOrderDataAdapter(Context context, List<MyOrderBean.DataBean.ListBean.OtherListBean> data) {
        super(R.layout.item_mine_order_data, data);
        this.mContext = context;
    }

    @Override
    protected void convert(BaseViewHolder helper,MyOrderBean.DataBean.ListBean.OtherListBean item) {
        ImageView photoIv = helper.getView(R.id.item_mine_order_data_iv);
        if (!TextUtils.isEmpty(item.getGoods_pic())) {
            Glide.with(mContext)
                    .load(item.getGoods_pic())
                    .into(photoIv);
        } else {

        }
        helper.addOnClickListener(R.id.item_mine_order_data_iv);
    }
}